package demo7;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class demo
{
    public static void main(String[] args)
    {
        System.out.println("正在初始化");
        AnnotationConfigApplicationContext an=
                new AnnotationConfigApplicationContext("demo7");
        System.out.println("初始化完成");
        person p=an.getBean(person.class);
        p.play();
        System.out.println("正在销毁");
        an.close();
        System.out.println("销毁完成");

    }
}
